<template>
    <div style="height:100%;width:100%;position:relative;">
        <div class="pagetop" ref="buttondiv">
            <template>
                <div>
                    <div ref="line1Buttondiv">
                        <table border="0" style="width:100%;font-size:12px;white-space: nowrap;" class="table1style">
                            <!-- 1. -->
                            <tr>
                                <td align="right">报告单元</td>
                                <td colspan='3'>
                                    <rm-ddl-rptunit prgno="LIS412" :multiple_choice="true" v-model="rptunitid" width="330px"
                                        @change="rptunitchange"></rm-ddl-rptunit>
                                    <!-- 简易组合报表添加多选报告单元 -->
                                </td>
                                <td align="right">病人类型</td>
                                <!-- :value="item.value" -->
                                <td colspan="3">
                                    <rm-ddl-common datatype="seccode" kindno="PT" @change="pttypchange" v-model="pttypecode"
                                        width="200px"></rm-ddl-common>
                                </td>
                                <td align="right">报告项目</td>
                                <td>
                                    <el-input v-model="txtrptitem" @click.native="dialogTableVisible1 = true"></el-input>
                                </td>
                                <td align="right">项目条件</td>
                                <td>
                                    <el-input placeholder="" style="width:200px" :readonly="true"></el-input>
                                </td>
                                <td align="right">病人ID</td>
                                <td>
                                    <el-input v-model="txtpatid" style="width:150px" clearable></el-input>
                                </td>
                                <td :width="line1ButtonWidth"></td>
                            </tr>
                            <!-- 2. -->
                            <tr>
                                <!-- <td align="right">标本日期</td> -->
                                <td align="right">
                                    <el-dropdown @command="handleCommand" style="font-size: 12px;">
                                        <u class="el-dropdown-link">
                                            {{ datename }}
                                        </u>
                                        <el-dropdown-menu slot="dropdown">
                                            <el-dropdown-item command="标本日期">
                                                <font font-size="12px">标本日期</font>
                                            </el-dropdown-item>
                                            <el-dropdown-item command="审核日期">
                                                <font font-size="12px">审核日期</font>
                                            </el-dropdown-item>
                                        </el-dropdown-menu>
                                    </el-dropdown>
                                </td>
                                <td v-if="daytype == '1'">
                                    <el-date-picker v-model="sample_startdt" :able="false" type="date" placeholder="选择日期"
                                        value-format="yyyy-MM-dd" style="width:150px;" :clearable="false">
                                    </el-date-picker>
                                </td>
                                <td v-else>
                                    <el-date-picker v-model="rechk_startdt" type="datetime" placeholder="选择日期"
                                        style="width:150px">
                                    </el-date-picker>
                                </td>
                                <td align="center" style="width:20px;padding:0 0 0 0px">至</td>
                                <td v-if="daytype == '1'">
                                    <el-date-picker v-model="sample_enddt" type="date" :able="false" placeholder="选择日期"
                                        value-format="yyyy-MM-dd" style="width:150px" :clearable="false">
                                    </el-date-picker>
                                </td>
                                <td v-else>
                                    <el-date-picker v-model="rechk_enddt" type="datetime" placeholder="选择日期"
                                        style="width:150px">
                                    </el-date-picker>
                                </td>
                                <td align="right">病历号</td>
                                <td colspan="3">
                                    <el-input v-model="pat_no" placeholder="" style="width:200px"></el-input>
                                </td>
                                <td align="right">科室</td>
                                <td>
                                    <el-select v-model="txtreqdeptno"
                                        @dblclick.native="popMultipleChk(txtreqdeptno, 'txtreqdeptno', deptOption, '申请科室选择')"
                                        filterable clearable style="width:200px">
                                        <el-option v-for="(item, index) in deptOption" :key="index" :value="item.data"
                                            :label="item.display">
                                        </el-option>
                                    </el-select>
                                </td>
                                <td align="right">检验目的</td>
                                <td>
                                    <el-input v-model="req_reason" placeholder="" style="width:200px"></el-input>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">标本号</td>
                                <td colspan="3">
                                    <el-input v-model="sampleno" placeholder="输入如1,2,5-8等格式" style="width:330px"></el-input>
                                </td>
                                <td align="right">姓名</td>
                                <td colspan="3">
                                    <el-input v-model="pat_name" placeholder="" style="width:200px"></el-input>
                                </td>
                                <td align="right">复查状态
                                </td>
                                <td>
                                    <el-select v-model="redo_flag" clearable style="width:200px">
                                        <el-option v-for="item in reoptions" :key="item.redo_flag" :label="item.label"
                                            :value="item.redo_flag">
                                        </el-option>
                                    </el-select>
                                </td>
                                <td align="right">
                                    审核状态
                                </td>
                                <td>
                                    <el-select v-model="rechkflag" clearable style="width:200px">
                                        <el-option v-for="item in rechkoptions" :key="item.rechkflag" :label="item.label"
                                            :value="item.rechkflag">
                                        </el-option>
                                    </el-select>
                                </td>
                                <!-- <td :width="line1ButtonWidth"></td> -->
                            </tr>
                            <!-- 5. -->
                            <tr>
                                <td align="right">项目组合</td>
                                <td colspan="3">
                                    <rm-ddl-common :appendtobody="true" datatype="reportitemcomb" dataname="项目组合" kindno="3"
                                        v-model="combcode" @change="itemcombchange" width="330px"></rm-ddl-common>
                                </td>
                                <td align="right">检验医生</td>
                                <td colspan="3">
                                    <rm-ddl-common defaultflag="1" @change="repuserchange" v-model="repusercode"
                                        width="200px" datatype="userinfo" dataname="检验医生"></rm-ddl-common>
                                </td>
                                <td align="right">送检医院</td>
                                <td>
                                    <el-select v-model="txtsendhospcode"
                                        @dblclick.native="popMultipleChk(txtsendhospcode, 'txtsendhospcode', hospOption, '请选择送检医院')"
                                        filterable clearable style="width:200px">
                                        <el-option v-for="(item, index) in hospOption" :key="index" :value="item.data"
                                            :label="item.display"></el-option>
                                    </el-select>
                                </td>
                                <!-- <td align="right">送检医院</td>
                                <td>
                                    <rm-ddl-common defaultflag="1" @change="hospcodechange" v-model="hospcode" width="200px" datatype="hospital"></rm-ddl-common>
                                </td> -->

                                <td align="right">审核医生</td>
                                <td>
                                    <rm-ddl-common defaultflag="1" @change="rechkuserchange" v-model="rechkusercode"
                                        width="200px" datatype="userinfo" dataname="审核医生"></rm-ddl-common>
                                </td>

                                <!-- <td :width="line1ButtonWidth"></td> -->
                            </tr>
                            <tr>
                                <td align="right"
                                    style="color:#409EFF;font-weight:bold;boder-color:#DCDFE6;cursor: pointer;"
                                    @click="Btncountitem">统计项目</td>
                                <td @click="Btncountitem"
                                    style="color:blue;font-weight:bold;cursor: pointer;border-spacing=2px" colspan="3">
                                    <!-- <div style="height: 100%;"> <u style="0 0 0 5px">{{infoitem}}</u> </div> -->
                                    <el-input v-model="infocode" readonly v-show="false"></el-input>
                                    <el-tag style="padding-left:5px;width='100%;size 16px'">{{ infoitem }}</el-tag>
                                </td>
                                <td align="right;" style="width:45px;text-align:right">最大查询行数</td>
                                <td style="width:60px">
                                    <el-input-number size="mini" v-model="rownum" controls-position="right"
                                        :controls="false" :min="1" :max="20000" style="width:60px"
                                        :clearable="false"></el-input-number>
                                </td>
                                <td align="right;" style="width:40px;text-align:right">最大项目列数</td>
                                <td style="width:60px">
                                    <el-input-number size="mini" v-model="colnum" controls-position="right"
                                        :controls="false" :min="1" :max="200" style="width:60px"
                                        :clearable="false"></el-input-number>
                                </td>
                                <td align="right">查询模板</td>
                                <td colspan="1">
                                    <table style="width:100%;border-spacing:0px">
                                        <tr>
                                            <td>
                                                <el-select v-model="txtquerymod" placeholder=""
                                                    @change="querymodChange($event)" clearable filterable>
                                                    <el-option v-for="(item, index) in querymodOption" :key="index"
                                                        :value="item.value" :label="item.label"></el-option>
                                                </el-select>
                                            </td>
                                            <td>
                                                <el-button @click.native="btnSavequerymod"
                                                    style="background-color:#e6e6e6;color:black">保存</el-button>
                                            </td>
                                            <td>
                                                <el-button @click.native="btnDelquerymod"
                                                    style="background-color:#e6e6e6;color:black">删除</el-button>
                                            </td>
                                        </tr>
                                    </table>
                                </td>

                                <td align="right">诊断</td>
                                <td colspan="3">
                                    <el-input v-model="pat_diag" style="width:200px"></el-input>
                                </td>

                                <td></td>
                            </tr>
                            <tr>
                                <td>混样报告</td>
                                <td>
                                    <el-select v-model="sel_mixrpt" placeholder="请选择" style="width:100%">
                                        <el-option key="0" label="全部报告" value="0"></el-option>
                                        <el-option key="1" label="混样主报告" value="1"></el-option>
                                        <el-option key="2" label="混样明细报告" value="2"></el-option>
                                    </el-select>
                                </td>

                                <td colspan="8">
                                    <el-checkbox v-model="sortitemflag" true-label="1"
                                        false-label="0">查询列按项目名排序</el-checkbox>
                                    <el-checkbox v-model="sel_showna" true-label="1" false-label="0">显示项目名称</el-checkbox>
                                    <el-checkbox v-model="sel_pushunit" true-label="1" false-label="0">结果带上单位</el-checkbox>
                                    <el-checkbox v-model="sel_notnull" true-label="1"
                                        false-label="0">仅显示有结果的项目</el-checkbox>
                                    <el-checkbox v-model="sel_abnormal" true-label="1" false-label="0">仅查询异常结果</el-checkbox>
                                </td>
                                <td>
                                    <el-popover placement="bottom-end" width="110" trigger="click">
                                        <el-select v-model="timetype" style="width:200px">
                                            <el-option v-for="(item, index) in timeoptions" :key="index" :value="item.value"
                                                :label="item.label">
                                            </el-option>
                                        </el-select>
                                        <el-link type="primary" :underline="true" style="font-size: 12px;"
                                            slot="reference">{{ "时间格式" }}</el-link>
                                    </el-popover>
                                </td>

                            </tr>
                        </table>
                        <table>
                            <tr>
                                <td :width="line1ButtonWidth"></td>
                                <el-button icon="el-icon-search" v-has="'PINQUERY'" type="primary" @click="btnQuery()"
                                    :disabled="waitquery">查询</el-button>
                                <el-button @click.native="BtnClear" class="el-icon-refresh-left">清除</el-button>
                                <!--去除打印-->
                                <!-- <el-button icon="el-icon-printer" @click="btnPrint(1)">打印</el-button>
                                <el-button icon="el-icon-zoom-in" @click="btnPrint(2)">预览</el-button>
                                <el-button icon="el-icon-printer" @click="btnPrint(3)">设计</el-button> -->
                                <el-button icon="el-icon-upload2" v-has="'PEXPORT'" @click="btnExport"
                                    style="margin-left: 10px">导出</el-button>
                                <el-button icon="el-icon-upload2" v-has="'PEXPORT'" @click="btnFastExport"
                                    style="margin-left: 10px">快速导出</el-button>
                                <td align="left">
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </template>
        </div>
        <div class="pagecenter">
            <div class="middle-center" ref="xTableDiv" style="height:100%;">
                <div style="height:100%">
                    <vxe-table :data="tableData" :loading="loading" :keyboard-config="keyConfig"
                        :keyboard-local-config="keyLocalConfig" :select-config="selectConfig"
                        :sort-config="{ trigger: 'cell' }" :edit-config="{ trigger: 'click', mode: 'cell' }"
                        class="editable-footer" border fit height="auto" header-align="center" weight="auto"
                        highlight-current-row highlight-hover-row highlight-hover-column show-footer ref="xTable" resizable
                        show-header-overflow="tooltip" show-overflow="tooltip" size="mini" stripe :key="xTablekey"
                        :cell-class-name="cellClassName" :optimization="{ scrollY: { gt: 80 } }">
                        <vxe-table-column :key="item.field" :field="item.field" :title="item.title"
                            v-for="item in tableColumn" align="center" :width="item.width" sortable
                            :sort-width="item.field == 'sampleno' ? 20 : 0">
                            <template v-slot="{ row }">
                                <div :style="{
                                    background: row[item.field + '_bgcolor'],
                                    color: row[item.field + '_color'],
                                }" style="padding: 0px 10px">
                                    <!-- <div> -->
                                    {{ row[item.field] }}
                                </div>
                            </template>
                        </vxe-table-column>
                        <template v-slot:fix>
                            <div style="font-size:12px;padding-top:3px;background-color:#fff;"><span
                                    style="color:red;margin-left:10px;float:right;">合计: {{ rpt_amount }}</span>
                                <div style="clear:both"></div>
                            </div>
                        </template>
                    </vxe-table>
                </div>
                <el-dialog title="统计项目" :visible.sync="dialogcountItem" width="1000px" v-el-drag-dialog
                    :append-to-body="true" :close-on-click-modal="false">
                    <div style="width:100%;height:40px;">
                        <div style="width:53%;float:left">
                            <table class="table1style">
                                <tr>
                                    <td>统计模版</td>
                                    <td>
                                        <el-select v-model="txtstasticsmod" placeholder=""
                                            @change="stasticmodChange($event)">
                                            <el-option v-for="(item, index) in stasticsmodOption" :key="index"
                                                :value="item.value" :label="item.label"></el-option>
                                        </el-select>
                                    </td>
                                    <td>
                                        <el-button @click.native="btnSaveStaticmod">保存</el-button>
                                        <el-button @click.native="btnDelStaticmod">删除</el-button>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div style="width:47%;float:left;padding-top:2px;position:absolute;right:0px">
                            <el-button icon="el-icon-top" @click="tabledatafirst()">首位</el-button>
                            <el-button icon="el-icon-top-right" @click="tabledataup()">上移</el-button>
                            <el-button icon="el-icon-bottom-right" @click="tabledatadown()">下移</el-button>
                            <el-button icon="el-icon-bottom" @click="tabledatalast()">末位</el-button>
                            <el-button icon="el-icon-close" @click.native="tabledataclear()">清除</el-button>
                        </div>
                    </div>
                    <div style="width:100%;height:400px;margin-top:5px">
                        <div style="width:70%;height:100%;float:left;overflow:auto;border:1px solid #ccc;">
                            <div id='left_nav' class="left_nav">
                                <div @click="showdiv(1)" :class="showseq == 1 ? 'active' : ''" ref="left1">
                                    1 基本信息
                                </div>
                                <div @click="showdiv(2)" :class="showseq == 2 ? 'active' : ''" ref="left2">
                                    2 就诊信息
                                </div>
                                <div @click="showdiv(3)" :class="showseq == 3 ? 'active' : ''" ref="left3">
                                    3 样本信息
                                </div>
                                <div @click="showdiv(4)" :class="showseq == 4 ? 'active' : ''" ref="left4">
                                    4 样本流转
                                </div>
                                <div @click="showdiv(5)" :class="showseq == 5 ? 'active' : ''" ref="left5">
                                    5 检验信息
                                </div>
                            </div>
                            <div id='right_nav' class="right_nav">
                                <table class="table1style" style="width:100%;padding:10px">

                                    <tr v-show="showseq == 1">
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '病历号', 'pat_no_flag')"
                                                v-model="pat_no_flag">病历号</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '姓名', 'pat_name_flag')"
                                                v-model="pat_name_flag" style="width:90px">姓名</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '性别', 'pat_sex_flag')"
                                                v-model="pat_sex_flag">性别&nbsp;&nbsp;&nbsp;</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '年龄', 'pat_ageyear_flag')"
                                                v-model="pat_ageyear_flag">年龄</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '年', 'age_flag')" v-model="age_flag"
                                                style="width:90px">年</el-checkbox>
                                        </td>
                                    </tr>
                                    <tr v-show="showseq == 1">
                                        <!-- <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event,'龄','year_flag')"
                                                        v-model="year_flag">龄</el-checkbox>
                                        </td> -->
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '身份证号', 'pat_idcardno_flag')"
                                                v-model="pat_idcardno_flag">身份证号</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '联系电话', 'pat_phone_flag')"
                                                v-model="pat_phone_flag">联系电话</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '民族', 'pat_nation_flag')"
                                                v-model="pat_nation_flag">民族&nbsp;&nbsp;&nbsp;&nbsp;</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '病人地址', 'pat_address_flag')"
                                                v-model="pat_address_flag">病人地址</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '病人ID', 'pat_id_flag')"
                                                v-model="pat_id_flag">病人ID</el-checkbox>
                                        </td>
                                    </tr>
                                    <tr v-show="showseq == 1">

                                    </tr>
                                    <tr v-show="showseq == 2">
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '就诊卡号', 'pat_cardno_flag')"
                                                v-model="pat_cardno_flag">就诊卡号</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '病人类型', 'codena_flag')"
                                                v-model="codena_flag">病人类型</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '费别', 'charge_typeno_flag')"
                                                v-model="charge_typeno_flag">费别&nbsp;&nbsp;&nbsp;&nbsp;</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '科室', 'deptname_flag')"
                                                v-model="deptname_flag">科室&nbsp;&nbsp;&nbsp;&nbsp;</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '病区', 'wardname_flag')"
                                                v-model="wardname_flag">病区&nbsp;&nbsp;&nbsp;</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '床号', 'req_bedno_flag')"
                                                v-model="req_bedno_flag"
                                                style="width:90px">床号&nbsp;&nbsp;&nbsp;&nbsp;</el-checkbox>
                                        </td>
                                    </tr>
                                    <tr v-show="showseq == 2">
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '临床诊断', 'pat_diag_flag')"
                                                v-model="pat_diag_flag">临床诊断</el-checkbox>
                                        </td>
                                    </tr>

                                    <tr v-show="showseq == 3">
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '条码号', 'barcode_flag')"
                                                v-model="barcode_flag">条码号</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '送检医院', 'hospitalname_flag')"
                                                v-model="hospitalname_flag">送检医院</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '送检医生', 'req_docno_flag')"
                                                v-model="req_docno_flag">送检医生</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '检验目的', 'req_reason_flag')"
                                                v-model="req_reason_flag" style="width:90px">检验目的</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '标本', 'specimen_name_flag')"
                                                v-model="specimen_name_flag">标本&nbsp;&nbsp;&nbsp;&nbsp;</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '报告备注', 'report_comm_flag')"
                                                v-model="report_comm_flag">报告备注</el-checkbox>
                                        </td>
                                    </tr>
                                    <tr v-show="showseq == 3">
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '标本状态备注', 'specimen_comm_flag')"
                                                v-model="specimen_comm_flag">标本备注</el-checkbox>
                                        </td>
                                    </tr>

                                    <tr v-show="showseq == 4">
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '申请时间', 'req_dt_flag')"
                                                v-model="req_dt_flag">申请时间</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '采样时间', 'sampled_dt_flag')"
                                                v-model="sampled_dt_flag">采样时间</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '送出时间', 'send_dt_flag')"
                                                v-model="send_dt_flag" style="width:90px">送出时间</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '送达时间', 'send_dt1_flag')"
                                                v-model="send_dt1_flag" style="width:90px">送达时间</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '接收时间', 'recieve_dt_flag')"
                                                v-model="recieve_dt_flag" style="width:90px">接收时间</el-checkbox>
                                        </td>
                                    </tr>
                                    <tr v-show="showseq == 4">
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '上机时间', 'test_dt_flag')"
                                                v-model="test_dt_flag">上机时间</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '采样人', 'sampled_user_flag')"
                                                v-model="sampled_user_flag" style="width:90px">采样人</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '送出护工', 'send_user_flag')"
                                                v-model="send_user_flag" style="width:90px">送出护工</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '送达护工', 'send_user1_flag')"
                                                v-model="send_user1_flag" style="width:90px">送达护工</el-checkbox>
                                        </td>
                                    </tr>
                                    <tr v-show="showseq == 5">
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '检验医生', 'report_user_flag')"
                                                v-model="report_user_flag" style="width:90px">检验医生</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '审核医生', 'rechk_user_flag')"
                                                v-model="rechk_user_flag">审核医生</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '报告时间', 'report_dt_flag')"
                                                v-model="report_dt_flag">报告时间</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '审核时间', 'rechk_dt_flag')"
                                                v-model="rechk_dt_flag">审核时间</el-checkbox>
                                        </td>
                                        <td class="show_item" align="left">
                                            <el-checkbox @change="chkcountitem($event, '检验仪器', 'instrname_flag')"
                                                v-model="instrname_flag">检验仪器</el-checkbox>
                                        </td>
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '上机信息', 'test_info_flag')"
                                                v-model="test_info_flag">上机信息</el-checkbox>
                                        </td>

                                    </tr>
                                    <tr v-show="showseq == 5">
                                        <td class="show_item">
                                            <el-checkbox @change="chkcountitem($event, '实验室意见', 'lab_advice_flag')"
                                                v-model="lab_advice_flag">实验室意见</el-checkbox>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <div style="width:29%;height:100%;float:left;margin-left:5px;overflow:auto;">
                            <vxe-table show-overflow ref="xTable1" height="auto" :select-config="{ reserve: true }"
                                :sort-config="{ trigger: 'cell' }" :mouse-config="{ selected: true }" :data.sync="tableData1"
                                border size="mini" show-header-overflow highlight-current-row highlight-hover-row resizable
                                stripe @current-change="currentChangeEvent1" @cell-dblclick="RemoveItem">
                                <vxe-table-column type="index" title="NO." width="50"></vxe-table-column>
                                <vxe-table-column field="countitem" title="统计项目(双击删除)" width="160" sortable
                                    header-align="center"></vxe-table-column>
                            </vxe-table>
                        </div>
                    </div>
                    <span slot="footer" class="dialog-footer">
                        <el-button type="primary" @click="dialogcountItemsave">确 定</el-button>
                        <el-button @click="dialogcountItem = false">取 消</el-button>
                    </span>
                </el-dialog>
                <!--报告项目--->
                <el-dialog width="1000px" top="10px" v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false"
                    title="报告项目" :visible.sync="dialogTableVisible1" :destroy-on-close="true">
                    <rm-pop-selrptitem @cancel="dialogTableVisible1 = false;" @selitem="addrptitem"
                        :rptUnitIds="rptunitid"></rm-pop-selrptitem>
                </el-dialog>
                <!--多选弹窗--->
                <el-dialog width="900px" v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false"
                    :title="multichktitle" :visible.sync="dialogMultipleVisible" :destroy-on-close="true">
                    <rm-SqlMultiple :leftOption="option1" :rightOption="option2" :name="fieldname"
                        @change="closedialog"></rm-SqlMultiple>
                </el-dialog>
            </div>
        </div>
    </div>
</template>

<script type="text/javascript">
import { Promise } from "q";
import { invalid } from "moment";
import XEUtils from "xe-utils";
export default {
    name: "LIS412",
    data() {
        return {
            isbigdata: false,
            waitquery: false,
            datename: "标本日期",
            daytype: "1",
            txtquerymod: "", //查询模版
            querymodOption: [], //查询模版列表
            txtstasticsmod: "", //弹窗统计模版
            txtsendhospcode: "",
            stasticsmodOption: [], //统计模版列表
            hospOption: "",
            infoitem: "姓名,性别,年龄,科室,临床诊断",
            infocode: "pat_name_flag,pat_sex_flag,pat_ageyear_flag,deptname_flag,pat_diag_flag", //pat_sex
            xTablekey: 0,
            pat_type_options: "", //病人类型组件
            fieldname: "",
            currRowIndex: 0,
            multichktitle: "",
            txtreqdeptno: "",
            txtrptitem: "",
            LPicData: "",
            RPicData: "",
            LPicTime: "",
            RPicTime: "",
            LPicName: "",
            RPicName: "",
            option1: [],
            option2: [],
            arrLPicData: [],
            arrRPicData: [],
            PhotoDialogVisible: false,
            sample_startdt: XEUtils.toDateString(new Date(), "yyyy-MM-dd"),
            sample_enddt: XEUtils.toDateString(new Date(), "yyyy-MM-dd"),
            rechk_startdt: XEUtils.toDateString(new Date(), "yyyy-MM-dd 00:00:00"),
            rechk_enddt: XEUtils.toDateString(new Date(), "yyyy-MM-dd 23:59:59"),
            collectSampleStartdt: "",
            collectSampleenddt: "",
            txtpatno: "",
            txtstatus: "",
            txtemerfalg: "",
            txtpatidcard: "",
            statusOptions: [],
            patTypeOptions: [],
            deptOption: "",
            txtpattype: "",
            txtpatname: "",
            txtbarcode: "",
            hospitalval: "",
            reqdeptval: "",
            exedeptval: "",
            reqgroupval: "",
            userinfoval: "",
            reqitemval: "",
            txtdocname: "",
            back_txtbarcode: "",
            showseq: 1,
            styleid: 0,
            selectConfig: {
                tigger: "row",
            },
            key_barcode: "",
            sampleno: "", //标本号
            pat_no: "", //病历号
            pat_name: "", //姓名
            req_reason: "", //检验目的
            //change框
            rptunitid: "",
            rptunitname: "血流变",
            combcode: "",
            combname: "",
            repusercode: "",
            repusername: "",
            rechkusercode: "",
            rechkusername: "",
            hospcode: "",
            hospname: "",
            pttypecode: "",
            txtpatid: "",
            pttypname: "",
            deptcode: "",
            deptname: "",
            pat_diag: "",
            diagname: "",
            initarr: "",
            sel_mixrpt: "0", //混样报告
            sortitemflag: "0",
            sel_showna: "0",
            sel_pushunit: "0",
            sel_notnull: "0",
            sel_abnormal: "0",
            totalData: [],
            tableColumn: [],
            tableData1: [],
            selrow: [],
            rpt_amount: 0,
            dialogMultipleVisible: false,
            dialogTableVisible1: false,
            loading: false,
            dialogcountItem: false, //组合统计弹窗
            //统计项目
            //1.基本信息 9项
            pat_no_flag: false,
            pat_name_flag: true,
            pat_sex_flag: true,
            pat_ageyear_flag: true,
            age_flag: false,
            year_flag: false,
            pat_idcardno_flag: false,
            pat_phone_flag: false,
            pat_nation_flag: false,
            pat_address_flag: false,
            pat_id_flag: false,
            //2.就诊信息 7项
            pat_cardno_flag: false,
            codena_flag: false,
            charge_typeno_flag: false,
            deptname_flag: true,
            wardname_flag: false,
            req_bedno_flag: false,
            pat_diag_flag: false,
            //3.样本信息 6项
            barcode_flag: false,
            hospitalname_flag: false,
            req_docno_flag: false,
            req_reason_flag: false,
            specimen_name_flag: false,
            report_comm_flag: false,
            specimen_comm_flag: false,
            //4.样本流转 6项
            req_dt_flag: false,
            sampled_dt_flag: false,
            send_dt_flag: false,
            send_dt1_flag: false,
            recieve_dt_flag: false,
            test_dt_flag: false,
            //5.检验信息 4项
            sampled_user_flag: false,
            send_user_flag: false,
            send_user1_flag: false,
            report_user_flag: false,
            rechk_user_flag: false,
            test_info_flag: false,
            lab_advice_flag: false,
            report_dt_flag: false,
            rechk_dt_flag: false,
            instrname_flag: false,

            tablePage: {
                total: 0,
                currentPage: 1,
                pageSize: 50,
            },
            keyConfig: {
                isEdit: true,
            },
            keyLocalConfig: {
                isArrow: true,
                isDel: true,
                isTab: true,
            },
            line1ButtonWidth: "",
            checked: true,
            radio: 3,
            tableData: [],
            tableDataAll: [],
            tableDataDetail: [],
            Itemsdialog: false,
            reoptions: [
                {
                    redo_flag: "0",
                    label: "无需复查",
                },
                {
                    redo_flag: "1",
                    label: "需要复查",
                },
                {
                    redo_flag: "2",
                    label: "已经复查",
                },
                {
                    redo_flag: "3",
                    label: "标识已经复查",
                },
            ],
            rechkoptions: [
                {
                    rechkflag: "0",
                    label: "未审",
                },
                {
                    rechkflag: "1",
                    label: "签名",
                },
                {
                    rechkflag: "2",
                    label: "初审",
                },
                {
                    rechkflag: "9",
                    label: "已审核",
                },
            ],
            timeoptions: [
                {
                    value: "0",
                    label: "yyyy/MM/dd HH:mm:ss",
                },
                {
                    value: "1",

                    label: "yyyy-MM-dd HH:mm:ss",
                },
                {
                    value: "2",
                    label: "yyyyMMddHHmmss",
                },
            ],
            timetype: "0",
            defaultColumn: [
                { title: "病人类型", field: "rp_pat_typecode", width: "65", position: "center" },
                { title: "科室", field: "rp_req_deptno", width: "100" },
                { title: "病区", field: "rp_req_wardno", width: "100" },
                { title: "样本类型", field: "rp_specimen_code", width: "80" },
                { title: "项目", field: "rp_req_itemname", width: "180" },
                { title: "分单类别", field: "rp_req_groupna", width: "80", position: "center" },
                { title: "年", field: "rp_sampleyear", width: "50", position: "center" },
                { title: "月", field: "rp_samplemonth", width: "60", position: "center" },
                { title: "日", field: "rp_sampleday", width: "80", position: "center" },
                { title: "采样-送出", field: "cp_tatsmpd2send", width: "80", position: "center" },
                { title: "送出-送达", field: "cp_tatsend2arr", width: "80", position: "center" },
                { title: "送达-接收", field: "cp_tatarr2rcv", width: "80", position: "center" },
                { title: "接收-录入", field: "cp_tatreceive2input", width: "80", position: "center" },
                { title: "录入-报告", field: "cp_tatinput2report", width: "80", position: "center" },
                { title: "申请-报告", field: "cp_tatreq2report", width: "80", position: "center" },
            ],
            redo_flag: "",
            rechkflag: "",
            userno: this.$tool.getSession(this.$tool.loginuserno),
            colnum: 200,
            rownum: 5000,
            rptitemname: "",
            macaddress: "",
        };
    },
    created() {
        this.initOption();
    },
    mounted() {
        this.GetOption();
        this.querymodOption = [];
        let modOption1 = localStorage.getItem("rm_Qmod_LIS412");
        let modOptions1 = JSON.parse(modOption1);
        if (modOptions1 != null) {
            this.querymodOption = XEUtils.clone(modOptions1, true);
        }
        this.stasticsmodOption = [];
        let modOption2 = localStorage.getItem("rm_Smod_LIS412");
        let modOptions2 = JSON.parse(modOption2);
        if (modOptions2 != null) {
            this.stasticsmodOption = XEUtils.clone(modOptions2, true);
        }
    },
    updated() {
        this.getButtonWidth();
    },
    methods: {
        hospitalchange() { },
        reqgroupchange() { },
        userinfochange() { },
        reqitemchange() { },
        handleCommand(name) {
            this.datename = name;
            if (name == "标本日期") {
                this.daytype = "1";
            } else if (name == "审核日期") {
                this.daytype = "2";
            }
        },
        // BtnQuery() {
        //     this.$refs.xTable1.commitProxy('query')
        // },
        // handlePageChange({ currentPage, pageSize }) {
        //     this.tablePage.currentPage = currentPage
        //     this.tablePage.pageSize = pageSize
        //     this.BtnQuery()
        // },
        BtnClear() {
            this.tableData = [];
            this.tableColumn = [];
            this.waitquery = false;
            //1
            // 删除清空导致报告单元为空
            // this.rptunitid = ""
            this.pttypecode = "";
            this.txtrptitem = "";
            this.txtreqdeptno = " ";
            //项目条件
            //2
            this.sample_startdt = XEUtils.toDateString(XEUtils.getWhatDay(new Date(), -7), XEUtils.toDateString(new Date(), "yyyy-MM-dd"));
            this.sample_enddt = XEUtils.toDateString(new Date(), "yyyy-MM-dd");
            this.rechk_startdt = XEUtils.toDateString(XEUtils.getWhatDay(new Date(), -7), XEUtils.toDateString(new Date(), "yyyy-MM-dd 00:00:00"));
            this.rechk_enddt = XEUtils.toDateString(new Date(), "yyyy-MM-dd 23:59:59");
            this.pat_no = "";
            this.deptcode = "";
            this.req_reason = "";
            //3
            this.sampleno = "";
            this.pat_name = "";
            this.redo_flag = "";
            this.rechkflag = "";
            //4
            //reportitemcomb项目组合
            this.combcode = "";
            this.repusercode = "";
            this.txtsendhospcode = "";
            this.rechkusercode = "";
            this.infoitem = "姓名,性别,年龄,科室,临床诊断";
            this.infocode = "pat_name_flag,pat_sex_flag,pat_ageyear_flag,deptname_flag,pat_diag_flag";
            this.txtquerymod = "";
            //5
            this.pat_diag = "";
            //6
            this.sel_mixrpt = "0";
            this.sortitemflag = "0";
            this.sel_showna = "0";
            this.sel_pushunit = "0";
            this.sel_notnull = "0";
            this.sel_abnormal = "0";
            //checkbox 1
            this.pat_no_flag = false;
            this.deptname_flag = false;
            this.specimen_name_flag = false;
            this.report_comm_flag = false;
            this.specimen_comm_flag = false;
            this.sampled_dt_flag = false;
            this.pat_phone_flag = false;
            this.pat_nation_flag = false;
            //2
            this.pat_name_flag = false;
            this.req_bedno_flag = false;
            this.req_reason_flag = false;
            this.sampled_user_flag = false;
            this.send_user_flag = false;
            this.send_user1_flag = false;
            this.report_user_flag = false;
            this.send_dt_flag = false;
            this.send_dt1_flag = false;
            this.recieve_dt_flag = false;
            this.age_flag = false;
            //3
            this.pat_sex_flag = false;
            this.pat_cardno_flag = false;
            this.barcode_flag = false;
            this.rechk_user_flag = false;
            this.test_dt_flag = false;
            this.year_flag = false;
            //4
            this.pat_ageyear_flag = false;
            this.req_docno_flag = false;
            this.pat_diag_flag = false;
            this.hospitalname_flag = false;
            this.report_dt_flag = false;
            this.wardname_flag = false;
            //5
            this.charge_typeno_flag = false;
            this.rechk_dt_flag = false;
            this.test_info_flag = false;
            this.codena_flag = false;
            this.req_dt_flag = false;
            this.lab_advice_flag = false;
            this.instrname_flag = false;
            //6
            this.pat_idcardno_flag = false;
            this.pat_address_flag = false;
            this.pat_id_flag = false;
        },
        GetOption() {
            this.$tool
                .request({
                    url: "LIS/LIS4/LIS412",
                    method: "post",
                    data: {
                        action: "get_styleid",
                    },
                })
                .then((res) => {
                    this.styleid = res.styleid; //送达清单样式
                })
                .catch((e) => {
                    console.log("error", e);
                });
        },
        btnPrint(btype) {
            // 打印
            if (this.rpt_amount > 0) {
                let column = this.$refs.xTable.getTableColumn().tableColumn;

                let colObj = this.$pub.InitColumn(column);
                let j = 1;
                for (let i = 0; i < colObj.length; i++) {
                    if (this.initarr.indexOf(colObj[i].property) == -1) {
                        colObj[i].title = "项目" + j;
                        j++;
                    }
                }
                let str = JSON.stringify(colObj);
                str += "\r";
                str += JSON.stringify(this.$refs.xTable.afterFullData);
                let sql = btoa(encodeURIComponent(str));
                if (this.styleid) {
                    if (btype == 1) {
                        jsObj.PrintCustomJsonReport(this.styleid, sql, this.userno, "简易组合报表", "");
                    } else if (btype == 3) {
                        jsObj.SetCustomJsonPrintConfig(this.styleid, sql, this.userno, "简易组合报表");
                    }
                } else {
                    return this.$message({
                        message: "未获取到打印样式id，请刷新页面后重试",
                        type: "warning",
                    });
                }
            } else {
                this.$message({
                    type: "info",
                    message: "请先搜索出数据",
                });
            }
        },
        //导出
        btnFastExport() {
            if (this.isbigdata) {
                this.btnQuery(1);
            } else {
                let options = {
                    filename: "LIS412简易组合报表.csv",
                };
                this.$refs.xTable.exportCsv(options);
            }
        },
        btnbigdataExport() {
            this.btnQuery(1);
        },
        btnExport() {
            if (this.isbigdata) {
                this.$message({
                    type: "info",
                    message: "当前数据大于20000，请耐心等待导出。",
                    duration: 4000,
                });
                this.btnQuery(1);
            } else {
                let filtertxt = this.getExportFilter();
                this.$pub.exportTableExcel(this.$refs.xTable.afterFullData, this.tableColumn, "LIS412简易组合报表.xlsx", filtertxt);
            }
        },
        BtnRePrintBarcode() { },
        BtnRePrintReceipt() { },
        BtnLookPic() {
            this.$tool
                .request({
                    url: "LIS/LIS1/LIS141",
                    method: "post",
                    data: {
                        action: "BtnLookPic",
                        barcode: this.key_barcode,
                    },
                })
                .then((res) => {
                    this.LPicName = res[0].Item1;
                    this.LPicTime = res[0].Item2;
                    this.LPicData = res[0].Item3;
                    this.arrLPicData.push(res[0].Item3);
                    this.RPicName = res[1].Item1;
                    this.RPicTime = res[1].Item2;
                    this.RPicData = res[1].Item3;
                    this.arrRPicData.push(res[1].Item3);
                    this.PhotoDialogVisible = true;
                })
                .catch((e) => {
                    console.log("error", e);
                });
        },
        BtnSamplingReceipt() { },

        getButtonWidth() {
            if (this.$refs.buttondiv) {
                this.line1ButtonWidth = this.$refs.line1Buttondiv.offsetWidth + "px";
            }
        },
        //病人类型下拉框
        ddl_pat_typecode() {
            this.$tool
                .request({
                    url: "MNG/MNG2/MNG246",
                    method: "post",
                    data: {
                        action: "ddl_pat_typecode",
                    },
                })
                .then((res) => {
                    this.pat_type_options = res.pr;
                });
        },
        btnQuery(flag) {
            this.loading = true;
            if (flag != 1) {
                this.tableColumn = [];
                this.waitquery = true;
            } else {
                this.$message({
                    type: "info",
                    message: "当前导出数据超过20000行，请耐心等待。",
                    duration: 6000,
                });
            }
            this.$tool
                .request({
                    url: "LIS/LIS4/LIS412",
                    method: "post",
                    timeout: flag == 1 ? 6000000 : 600000,
                    data: {
                        action: "query",
                        qexport: flag,
                        daytype: this.daytype, //标本日期(1) 审核日期(2)
                        colnum: this.colnum,
                        rownum: this.rownum,
                        rptunitid: this.rptunitid,
                        pat_typecode: this.pttypecode,
                        rptitemcode: this.txtrptitem,
                        sample_startdt: this.sample_startdt,
                        sample_enddt: this.sample_enddt,
                        rechk_startdt: this.rechk_startdt,
                        rechk_enddt: this.rechk_enddt,
                        pat_no: this.pat_no,
                        req_deptno: this.txtreqdeptno,
                        req_reason: this.req_reason,
                        sampleno: this.sampleno,
                        pat_name: this.pat_name,
                        redo_flag: this.redo_flag,
                        rechkflag: this.rechkflag,
                        combcode: this.combcode,
                        report_user: this.repusercode,
                        hospcode: this.txtsendhospcode,
                        rechk_user: this.rechkusercode,
                        infoitem: this.infoitem, //统计项目
                        infocode: this.infocode, //要查询的列数
                        pat_diag: this.pat_diag,
                        sel_mixrpt: this.sel_mixrpt,
                        sortitemflag: this.sortitemflag,
                        sel_showna: this.sel_showna,
                        sel_pushunit: this.sel_pushunit,
                        sel_notnull: this.sel_notnull,
                        sel_abnormal: this.sel_abnormal,
                        txtquerymod: this.txtquerymod,
                        timetype: this.timetype,
                        txtpatid: this.txtpatid,
                        macaddress: this.macaddress,
                        //1
                        pat_no_flag: this.pat_no_flag ? true : false,
                        deptname_flag: this.deptname_flag ? 1 : 0,
                        specimen_name_flag: this.specimen_name_flag ? 1 : 0,
                        report_comm_flag: this.report_comm_flag ? 1 : 0,
                        specimen_comm_flag: this.specimen_comm_flag ? 1 : 0,
                        sampled_dt_flag: this.sampled_dt_flag ? 1 : 0,
                        pat_phone_flag: this.pat_phone_flag ? 1 : 0,
                        pat_nation_flag: this.pat_nation_flag ? 1 : 0,
                        //2
                        pat_name_flag: this.pat_name_flag ? 1 : 0,
                        req_bedno_flag: this.req_bedno_flag ? 1 : 0,
                        req_reason_flag: this.req_reason_flag ? 1 : 0,
                        sampled_user_flag: this.sampled_user_flag ? 1 : 0,
                        send_user_flag: this.send_user_flag ? 1 : 0,
                        send_user1_flag: this.send_user1_flag ? 1 : 0,
                        report_user_flag: this.report_user_flag ? 1 : 0,
                        send_dt_flag: this.send_dt_flag ? 1 : 0,
                        send_dt1_flag: this.send_dt1_flag ? 1 : 0,
                        recieve_dt_flag: this.recieve_dt_flag ? 1 : 0,
                        age_flag: this.age_flag ? 1 : 0,
                        //3
                        pat_sex_flag: this.pat_sex_flag ? 1 : 0,
                        pat_cardno_flag: this.pat_cardno_flag ? 1 : 0,
                        barcode_flag: this.barcode_flag ? 1 : 0,
                        rechk_user_flag: this.rechk_user_flag ? 1 : 0,
                        test_dt_flag: this.test_dt_flag ? 1 : 0,
                        year_flag: this.year_flag ? 1 : 0,
                        //4
                        pat_ageyear_flag: this.pat_ageyear_flag ? 1 : 0,
                        req_docno_flag: this.req_docno_flag ? 1 : 0,
                        pat_diag_flag: this.pat_diag_flag ? 1 : 0,
                        hospitalname_flag: this.hospitalname_flag ? 1 : 0,
                        report_dt_flag: this.report_dt_flag ? 1 : 0,
                        wardname_flag: this.wardname_flag ? 1 : 0,
                        //5
                        charge_typeno_flag: this.charge_typeno_flag ? 1 : 0,
                        rechk_dt_flag: this.rechk_dt_flag ? 1 : 0,
                        instrname_flag: this.instrname_flag ? 1 : 0,
                        test_info_flag: this.test_info_flag ? 1 : 0,
                        codena_flag: this.codena_flag ? 1 : 0,
                        req_dt_flag: this.req_dt_flag ? 1 : 0,
                        lab_advice_flag: this.lab_advice_flag ? 1 : 0,
                        //6
                        pat_idcardno_flag: this.pat_idcardno_flag ? 1 : 0,
                        pat_address_flag: this.pat_address_flag ? 1 : 0,
                        pat_id_flag: this.pat_id_flag ? 1 : 0,
                    },
                })
                .then((res) => {
                    var collist = [
                        {
                            title: "NO.",
                            type: "index",
                            width: 150,
                        },
                    ];
                    this.loading = false;
                    if (flag != 1) {
                        this.waitquery = false;
                        this.rpt_amount = res.count_dt;
                        this.initarr = res.initarr;
                        ++this.xTablekey;
                        this.tableColumn = res.Cols;
                        this.tableData = res.Data;
                        // this.tableData = [];
                        // for (var i = 0; i < 100; i++) {
                        //     this.tableData.push(res.Data[i]);
                        // }
                        // console.log("🤣   this.tableData2:", res.Data);
                        if (res.colmsg != "") {
                            this.$message({
                                type: "info",
                                message: res.colmsg,
                                duration: 4000,
                            });
                        }
                        this.isbigdata = res.isbigdata;
                        if (res.count_dt >= 20000 && res.isbigdata) {
                            this.$message({
                                type: "info",
                                message: "当前数据大于20000，仅显示前20000条数据。",
                                duration: 4000,
                            });
                        }
                    } else {
                        let filtertxt = this.getExportFilter();
                        this.$pub.exportTableExcel(res.Data, res.Cols, "LIS412 简易组合报表.xlsx", filtertxt);
                    }
                })
                .catch((e) => {
                    this.loading = false;
                    this.waitquery = false;
                    this.$alert(e);
                });
        },
        // 获取当前导出文件的所有查询条件
        getExportFilter() {
            let filtertxt = this.datename + ":" + XEUtils.toDateString(this.daytype == "1" ? this.sample_startdt : this.rechk_startdt, this.daytype == "1" ? "yyyy-MM-dd" : "yyyy-MM-dd HH:mm:ss") + "至" + XEUtils.toDateString(this.daytype == "1" ? this.sample_enddt : this.rechk_enddt, this.daytype == "1" ? "yyyy-MM-dd" : "yyyy-MM-dd HH:mm:ss") + "; ";
            if (this.rptunitid) filtertxt += "报告单元:" + this.rptunitname + "; ";
            if (this.txtrptitem) filtertxt += "报告项目:" + this.rptitemname + "; ";
            if (this.txtpatid) filtertxt += "病人ID:" + this.txtpatid + "; ";
            if (this.pat_no) filtertxt += "病历号:" + this.pat_no + "; ";
            if (this.txtreqdeptno) filtertxt += "科室:" + this.getOptionName(this.deptOption.filter((item) => ("," + this.txtreqdeptno + ",").indexOf("," + item.data + ",") > -1)) + "; ";
            if (this.req_reason) filtertxt += "检验目的:" + this.req_reason + "; ";
            if (this.sampleno) filtertxt += "标本号:" + this.sampleno + "; ";
            if (this.pat_name) filtertxt += "姓名:" + this.pat_name + "; ";
            if (this.redo_flag) filtertxt += "复查状态:" + this.getOptionName(this.reoptions.filter((item) => this.redo_flag == item.redo_flag)) + "; ";
            if (this.rechkflag) filtertxt += "审核状态:" + this.getOptionName(this.rechkoptions.filter((item) => this.rechkflag == item.rechkflag)) + "; ";
            if (this.combcode) filtertxt += "项目组合:" + this.combname + "; ";
            if (this.repusercode) filtertxt += "检验医生:" + this.repusername + "; ";
            if (this.txtsendhospcode) filtertxt += "送检医院:" + this.getOptionName(this.hospOption.filter((item) => ("," + this.txtsendhospcode + ",").indexOf("," + item.data + ",") > -1)) + "; ";

            if (this.rechkusercode) filtertxt += "审核医生:" + this.rechkusername + "; ";
            if (this.infocode) filtertxt += "统计项目:" + this.infoitem + "; ";
            if (this.rownum) filtertxt += "最大查询行数:" + this.rownum + "; ";
            if (this.colnum) filtertxt += "最大项目列数:" + this.colnum + "; ";
            if (this.txtquerymod) filtertxt += "查询模板:" + this.getOptionName(this.querymodOption.filter((item) => ("," + this.txtquerymod + ",").indexOf("," + item.value + ",") > -1)) + "; ";
            if (this.pat_diag) filtertxt += "诊断:" + this.pat_diag + "; ";
            if (this.sel_mixrpt) filtertxt += "混样报告:" + (this.sel_mixrpt == "0" ? "全部报告" : this.sel_mixrpt == "1" ? "混样主报告" : "混样明细报告") + "; ";
            if (this.sortitemflag == "1") filtertxt += "查询列按项目名排序; ";
            if (this.sel_showna == "1") filtertxt += "显示项目名称; ";
            if (this.sel_pushunit == "1") filtertxt += "结果带上单位; ";
            if (this.sel_notnull == "1") filtertxt += "仅显示有结果的项目; ";
            if (this.sel_abnormal == "1") filtertxt += "仅查询异常结果; ";
            if (this.timetype) filtertxt += "时间格式:" + this.getOptionName(this.timeoptions.filter((item) => this.timetype == item.value)) + "; ";
            return filtertxt;
        },
        getOptionName(option) {
            if (option && option.length > 0) {
                let optionname = "";
                option.forEach((item) => {
                    if (item.hasOwnProperty("display")) {
                        optionname += item.display + ",";
                    } else {
                        optionname += item.label + ",";
                    }
                });
                return optionname.substring(0, optionname.length - 1);
            } else {
                return "";
            }
        },
        //报告单元
        rptunitchange(code, name) {
            this.rptunitid = code;
            this.rptunitname = name;
        },
        //项目组合 未加
        itemcombchange(code, name) {
            this.combcode = code;
            this.combname = name;
        },
        //检验医生
        repuserchange(code, name) {
            this.repusercode = code;
            this.repusername = name;
        },
        //审核医生
        rechkuserchange(code, name) {
            this.rechkusercode = code;
            this.rechkusername = name;
        },
        //送检医院
        hospcodechange(code, name) {
            this.hospcode = code;
            this.hospname = name;
        },
        //病人类型
        pttypchange(code, name) {
            this.pttypecode = code;
            this.pttypname = name;
        },
        //科室
        deptchange(code, name) {
            this.deptcode = code;
            this.deptname = name;
        },
        //诊断
        diagchange(code, name) {
            this.pat_diag = name;
            this.diagname = name;
        },
        //勾选项目
        showdiv(seq) {
            if (seq == 1) {
                this.$refs.left1;
                this.showseq = 1;
            } else if (seq == 2) {
                this.showseq = 2;
            } else if (seq == "3") {
                this.showseq = 3;
            } else if (seq == "4") {
                this.showseq = 4;
            } else if (seq == "5") {
                this.showseq = 5;
            }
        },
        //检验医生 审核医生等姓名 用户表不全暂显示code
        FormatData({ cellValue, row, column }) {
            let arrdt = ["sampledate", "sampled_dt", "send_dt", "send_dt1", "recieve_dt", "test_dt", "report_dt", "req_dt", "pat_sex"];
            if (column.property == "sampledate") {
                //样本日期
                return XEUtils.toDateString(cellValue, "yyyy-MM-dd");
            } else if (column.property == "sampled_dt" || "send_dt" || "send_dt1" || "recieve_dt" || "test_dt" || "report_dt" || "req_dt") {
                return XEUtils.toDateString(cellValue, "yyyy-MM-dd HH:mm:ss");
            } else if (columm.property == "pat_sex") {
                if (row.reqtype == "1") {
                    return "男";
                } else if (row.reqtype == "2") {
                    return "女";
                }
            } else {
                return cellValue;
            }
        },
        Itemswindow() {
            this.showseq = 1;
            this.Itemsdialog = true;
        },
        //弹出统计项目
        Btncountitem() {
            //重置所有选项
            //1.基本信息 9项
            this.pat_no_flag = false;
            this.pat_name_flag = false;
            this.pat_sex_flag = false;
            this.pat_ageyear_flag = false;
            this.age_flag = false;
            this.year_flag = false;
            this.pat_idcardno_flag = false;
            this.pat_phone_flag = false;
            this.pat_nation_flag = false;
            this.pat_address_flag = false;
            this.pat_id_flag = false;
            //2.就诊信息 7项
            this.pat_cardno_flag = false;
            this.codena_flag = false;
            this.charge_typeno_flag = false;
            this.deptname_flag = false;
            this.wardname_flag = false;
            this.req_bedno_flag = false;
            this.pat_diag_flag = false;
            //3.样本信息 6项
            this.barcode_flag = false;
            this.hospitalname_flag = false;
            this.req_docno_flag = false;
            this.req_reason_flag = false;
            this.specimen_name_flag = false;
            this.report_comm_flag = false;
            this.specimen_comm_flag = false;
            //4.样本流转 6项
            this.req_dt_flag = false;
            this.sampled_dt_flag = false;
            this.send_dt_flag = false;
            this.send_dt1_flag = false;
            this.recieve_dt_flag = false;
            this.test_dt_flag = false;
            this.sampled_user_flag = false;
            this.send_user_flag = false;
            this.send_user1_flag = false;
            //5.检验信息 4项
            this.report_user_flag = false;
            this.rechk_user_flag = false;
            this.test_info_flag = false;
            this.lab_advice_flag = false;
            this.report_dt_flag = false;
            this.rechk_dt_flag = false;
            this.instrname_flag = false;

            this.dialogcountItem = true; //开窗

            //表格及checkbox重新赋值
            let _this = this;
            setTimeout(() => {
                this.$refs.xTable1.tableData = [];
                if (_this.infoitem != "") {
                    let name = _this.infoitem.split(",");
                    let code = _this.infocode.split(",");
                    let datas = this.$refs.xTable1.tableData;
                    for (let i = 0; i < name.length; i++) {
                        let finddatas = datas.filter((item) => item.countitem == name[i]);
                        if (finddatas.length == 0) {
                            this.$refs.xTable1
                                .insert({
                                    countitem: name[i],
                                    countcode: code[i],
                                })
                                .then(({ row }) => {
                                    this.$refs.xTable1.setCurrentRow(row);
                                });
                            this.currRowIndex = name.length - 1;
                        }
                        _this[code[i]] = true;
                    }
                }
            }, 20);
        },
        //选择统计项目
        chkcountitem(e, name, code) {
            let tablelist = this.$refs.xTable1.tableData;
            let ishave = tablelist.find((m) => m.countitem == name);
            if (e) {
                if (ishave == undefined) {
                    //防止重复插入
                    this[code] = true;
                    this.$refs.xTable1.insert({ countcode: code, countitem: name }).then(({ row }) => {
                        this.$refs.xTable1.setCurrentRow(row);
                        this.currRowIndex = tablelist.length - 1;
                    });
                }
            } else {
                try {
                    if (ishave != undefined) {
                        this[code] = false;
                        var alld = this.$refs.xTable1.tableData;
                        var rowindex = alld.indexOf(ishave);
                        this.$refs.xTable1.remove(ishave);
                        let havedata = this.$refs.xTable1.tableData;
                        if (havedata.length > 0) {
                            if (rowindex >= havedata.length) rowindex = havedata.length - 1;
                            let selectrow = havedata[rowindex];
                            this.$refs.xTable1.setCurrentRow(selectrow);
                            this.currRowIndex = rowindex;
                        }
                    }
                } catch (e) {
                    console.log("error", e);
                }
            }
        },

        tabledataup() {
            if (this.currRowIndex > 0) {
                let upData = this.$refs.xTable1.tableData[this.currRowIndex - 1];
                let currentrow = this.$refs.xTable1.tableData[this.currRowIndex];
                this.$refs.xTable1.tableData.splice(this.currRowIndex - 1, 1);
                this.$refs.xTable1.tableData.splice(this.currRowIndex, 0, upData);
                this.currRowIndex = this.currRowIndex - 1;
                this.$nextTick(() => {
                    this.$refs.xTable1.setCurrentRow(currentrow);
                });
            }
        },
        tabledatadown() {
            if (this.currRowIndex !== this.$refs.xTable1.tableData.length - 1) {
                let downData = this.$refs.xTable1.tableData[this.currRowIndex + 1];
                let currentrow = this.$refs.xTable1.tableData[this.currRowIndex];
                this.$refs.xTable1.tableData.splice(this.currRowIndex + 1, 1);
                this.$refs.xTable1.tableData.splice(this.currRowIndex, 0, downData);
                this.currRowIndex = this.currRowIndex + 1;
                this.$nextTick(() => {
                    this.$refs.xTable1.setCurrentRow(currentrow);
                });
            }
        },
        tabledatalast() {
            if (this.currRowIndex != this.$refs.xTable1.tableData.length - 1) {
                let lastData = this.$refs.xTable1.tableData[this.currRowIndex];
                this.$refs.xTable1.tableData.splice(this.currRowIndex, 1);
                this.$refs.xTable1.tableData.splice(this.$refs.xTable1.tableData.length, 0, lastData);
                this.currRowIndex = this.$refs.xTable1.tableData.length - 1;
                this.$nextTick(() => {
                    this.$refs.xTable1.setCurrentRow(lastData);
                });
            }
        },
        tabledatafirst() {
            if (this.currRowIndex > 0) {
                let firstData = this.$refs.xTable1.tableData[this.currRowIndex];
                this.$refs.xTable1.tableData.splice(this.currRowIndex, 1);
                this.$refs.xTable1.tableData.splice(0, 0, firstData);
                this.currRowIndex = 0;
                this.$nextTick(() => {
                    this.$refs.xTable1.setCurrentRow(firstData);
                });
            }
        },
        dialogcountItemsave() {
            let data = this.$refs.xTable1.tableData;
            let res1 = "";
            let res2 = "";
            if (data.length > 0) {
                data.forEach((element) => {
                    if (res2 == "") {
                        res2 = element.countitem;
                        res1 = element.countcode;
                    } else {
                        res2 += "," + element.countitem;
                        res1 += "," + element.countcode;
                    }
                });
            }
            this.infoitem = res2;
            this.infocode = res1;
            this.dialogcountItem = false;
        },
        currentChangeEvent1({ row, $rowIndex }) {
            this.currRowIndex = $rowIndex;
        },
        //统计模版保存
        btnSaveStaticmod() {
            let jsondate = {
                tabledata: this.$refs.xTable1.tableData,
            };
            this.$prompt("统计模版保存名称", "文字编辑", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                // inputPattern: /^\s*$/g,
                // inputErrorMessage: "模版名称格式不正确"
            })
                .then(({ value }) => {
                    if (value && value.trim() != "") {
                        this.stasticsmodOption = [];
                        let modOption = localStorage.getItem("rm_Smod_LIS412");
                        let modOptions = JSON.parse(modOption);
                        let item = undefined;
                        if (modOptions != null) {
                            this.stasticsmodOption = XEUtils.clone(modOptions, true);
                            item = modOptions.find((m) => m.value == value);
                        }
                        if (item != undefined) {
                        } else {
                            this.stasticsmodOption.push({
                                label: value,
                                value: value,
                            });
                        }
                        let modListJson = JSON.stringify(jsondate);
                        let modList = JSON.stringify(this.stasticsmodOption);
                        localStorage.setItem("rm_Smod_LIS412_" + value, modListJson);
                        localStorage.setItem("rm_Smod_LIS412", modList);
                        this.txtstasticsmod = value;
                    }
                })
                .catch(() => {
                    this.$message({
                        type: "info",
                        message: "取消输入",
                    });
                });
        },
        //统计模版删除
        btnDelStaticmod() {
            this.$confirm("您确定删除查询模版：" + this.txtstasticsmod + "吗？", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            })
                .then(() => {
                    let value = this.txtstasticsmod;
                    localStorage.removeItem("rm_Smod_LIS412_" + value);
                    let modList = localStorage.getItem("rm_Smod_LIS412");
                    let jsondate = JSON.parse(modList);
                    this.stasticsmodOption = [];
                    jsondate.forEach((item) => {
                        if (item.value == value) {
                        } else {
                            this.stasticsmodOption.push(item);
                        }
                    });
                    let newmodList = JSON.stringify(this.stasticsmodOption);
                    localStorage.setItem("rm_Smod_LIS412", newmodList);
                    this.txtstasticsmod = "";
                })
                .catch(() => { });
        },
        //统计模版选择
        stasticmodChange(value) {
            let modList = localStorage.getItem("rm_Smod_LIS412");
            let tempOption = JSON.parse(modList);
            this.stasticsmodOption = tempOption;
            let obj = localStorage.getItem("rm_Smod_LIS412_" + value);
            let jsondate = JSON.parse(obj);
            this.$nextTick(() => {
                this.$refs.xTable1.tableData = jsondate.tabledata;
                setTimeout(() => {
                    let data = this.$refs.xTable1.tableData;
                    if (data.length != 0) {
                        this.currRowIndex = 0;
                        this.$refs.xTable1.setCurrentRow(data[0]);
                    }
                }, 10);
            });
        },
        //查询模版选择
        querymodChange(value) {
            let modList = localStorage.getItem("rm_Qmod_LIS412");
            let tempOption = JSON.parse(modList);
            this.querymodOption = tempOption;
            let obj = localStorage.getItem("rm_Qmod_LIS412_" + value);
            let jsondate = JSON.parse(obj);
            this.rptunitid = jsondate.rptunitid;
            this.rptunitname = jsondate.rptunitname;
            this.pttypecode = jsondate.pttypecode;
            this.pttypname = jsondate.pttypname;
            this.txtrptitem = jsondate.txtrptitem;
            this.rptitemname = jsondate.rptitemname;
            this.txtpatid = jsondate.txtpatid;
            this.sample_startdt = jsondate.sample_startdt;
            this.sample_enddt = jsondate.sample_enddt;
            this.rechk_startdt = jsondate.rechk_startdt;
            this.rechk_enddt = jsondate.rechk_enddt;
            this.pat_no = jsondate.pat_no;
            this.txtreqdeptno = jsondate.txtreqdeptno;
            this.req_reason = jsondate.req_reason;
            this.sampleno = jsondate.sampleno;
            this.pat_name = jsondate.pat_name;
            this.redo_flag = jsondate.redo_flag;
            this.rechkflag = jsondate.rechkflag;
            this.combcode = jsondate.combcode;
            this.combname = jsondate.combname;
            this.repusercode = jsondate.repusercode;
            this.repusername = jsondate.repusername;
            this.txtsendhospcode = jsondate.txtsendhospcode;
            this.rechkusercode = jsondate.rechkusercode;
            this.rechkusername = jsondate.rechkusername;
            this.infoitem = jsondate.infoitem;
            this.infocode = jsondate.infocode;
            this.txtquerymod = jsondate.txtquerymod;
            this.pat_diag = jsondate.pat_diag;
            this.sel_mixrpt = jsondate.sel_mixrpt;
            this.sortitemflag = jsondate.sortitemflag;
            this.sel_showna = jsondate.sel_showna;
            this.sel_pushunit = jsondate.sel_pushunit;
            this.sel_notnull = jsondate.sel_notnull;
            this.sel_abnormal = jsondate.sel_abnormal;
        },
        //查询模版保存
        btnSavequerymod() {
            let jsondate = {
                rptunitid: this.rptunitid,
                rptunitname: this.rptunitname,
                pttypecode: this.pttypecode,
                pttypname: this.pttypname,
                txtrptitem: this.txtrptitem,
                rptitemname: this.rptitemname,
                txtpatid: this.txtpatid,
                sample_startdt: this.sample_startdt,
                rechk_startdt: this.rechk_startdt,
                rechk_enddt: this.rechk_enddt,
                sample_enddt: this.sample_enddt,
                pat_no: this.pat_no,
                req_deptno: this.deptcode,
                req_reason: this.req_reason,
                sampleno: this.sampleno,
                pat_name: this.pat_name,
                redo_flag: this.redo_flag,
                rechkflag: this.rechkflag,
                combcode: this.combcode,
                combname: this.combname,
                repusercode: this.repusercode,
                repusername: this.repusername,
                txtsendhospcode: this.txtsendhospcode,
                rechkusercode: this.rechkusercode,
                rechkusername: this.rechkusername,
                sel_mixrpt: this.sel_mixrpt,
                sortitemflag: this.sortitemflag,
                sel_showna: this.sel_showna,
                sel_pushunit: this.sel_pushunit,
                sel_notnull: this.sel_notnull,
                sel_abnormal: this.sel_abnormal,

                infoitem: this.infoitem, //统计项目
                infocode: this.infocode, //要查询的列数
                pat_diag: this.pat_diag,
                txtquerymod: this.txtquerymod,
                txtreqdeptno: this.txtreqdeptno,
            };
            this.$prompt("查询模版保存名称", "文字编辑", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
            })
                .then(({ value }) => {
                    if (value && value.trim() != "") {
                        this.querymodOption = [];
                        let modOption = localStorage.getItem("rm_Qmod_LIS412");
                        let modOptions = JSON.parse(modOption);
                        let item = undefined;
                        if (modOptions != null) {
                            this.querymodOption = XEUtils.clone(modOptions, true);
                            item = modOptions.find((m) => m.value == value);
                        }
                        if (item != undefined) {
                        } else {
                            this.querymodOption.push({
                                label: value,
                                value: value,
                            });
                        }
                        let modListJson = JSON.stringify(jsondate);
                        let modList = JSON.stringify(this.querymodOption);
                        localStorage.setItem("rm_Qmod_LIS412_" + value, modListJson);
                        localStorage.setItem("rm_Qmod_LIS412", modList);
                        this.txtquerymod = value;
                    }
                })
                .catch(() => {
                    this.$message({
                        type: "info",
                        message: "取消输入",
                    });
                });
        },
        //查询模版删除
        btnDelquerymod() {
            this.$confirm("您确定删除查询模版：" + this.txtquerymod + "吗？", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            })
                .then(() => {
                    let value = this.txtquerymod;
                    localStorage.removeItem("rm_Qmod_LIS412_" + value);
                    let modList = localStorage.getItem("rm_Qmod_LIS412");
                    let jsondate = JSON.parse(modList);
                    this.querymodOption = [];
                    jsondate.forEach((item) => {
                        if (item.value == value) {
                        } else {
                            this.querymodOption.push(item);
                        }
                    });
                    let newmodList = JSON.stringify(this.querymodOption);
                    localStorage.setItem("rm_Qmod_LIS412", newmodList);
                    this.txtquerymod = "";
                })
                .catch(() => { });
        },
        addrptitem(rptitemcodeinfos) {
            this.txtrptitem = "";
            this.rptitemname = "";
            for (var i = 0; i < rptitemcodeinfos.length; i++) {
                if (this.txtrptitem == "") {
                    this.txtrptitem = rptitemcodeinfos[i].rpt_itemcode;
                    this.rptitemname = rptitemcodeinfos[i].rpt_itemname;
                } else {
                    this.txtrptitem += "," + rptitemcodeinfos[i].rpt_itemcode;
                    this.rptitemname += "," + rptitemcodeinfos[i].rpt_itemname;
                }
            }
            this.dialogTableVisible1 = false;
        },
        async initOption() {
            if (typeof jsObj != "undefined") {
                var computeInfo = jsObj.GetComputeInfo();
                var arr = computeInfo.split("\r");
                if (arr.length == 3) {
                    this.macaddress = arr[0];
                    console.log("🤣  this.macaddressde=:", this.macaddress);
                }
            } else {
                this.macaddress = "Default";
                console.log("🤣  this.macaddress:", this.macaddress);
            }
            try {
                const res = await this.$tool.request({
                    url: "LIS/LIS4/LIS412",
                    method: "post",
                    data: {
                        action: "initOption",
                    },
                });
                this.deptOption = res.deptOption;
                //送检医院添加所有医院列，用于查询所有数据，当前医院数据，所有医院数据
                var allHosp = {
                    data: "All",
                    display: "所有医院",
                    inputcode: "SYYY",
                };
                this.hospOption = res.hospOption;
                this.hospOption.unshift(allHosp);
            } catch (e) {
                this.$message.warning(e);
            }
        },
        popMultipleChk(e, fieldname, option, title) {
            let temp = XEUtils.clone(option, true);
            this.option1 = [];
            this.option2 = [];
            if (e != "") {
                let k = e.split(",");
                k.forEach((item) => {
                    let ndata = temp.find((m) => m.data == item);
                    if (ndata != undefined && ndata != null) {
                        this.option2.push(ndata);
                    }
                });
                temp.forEach((item) => {
                    if (k.indexOf(item.data + "") < 0) {
                        this.option1.push(item);
                    }
                });
            } else {
                this.option1 = temp;
            }
            this.fieldname = fieldname;
            this.multichktitle = title;
            this.dialogMultipleVisible = true;
        },
        closedialog(value, name) {
            this[name] = value;
            this.dialogMultipleVisible = false;
        },
        RemoveItem({ row, column }) {
            this[row.countcode] = false;
            try {
                var delrow = this.$refs.xTable1.getCurrentRow();
                if (delrow) {
                    var alld = this.$refs.xTable1.tableData;
                    var rowindex = alld.indexOf(delrow);
                    this.$refs.xTable1.remove(delrow);
                    let havedata = this.$refs.xTable1.tableData;
                    if (havedata.length > 0) {
                        if (rowindex >= havedata.length) rowindex = havedata.length - 1;
                        let selectrow = havedata[rowindex];
                        this.$refs.xTable1.setCurrentRow(selectrow);
                        this.handchangerow(selectrow, rowindex);
                        this.message = selectrow.rptitemshow;
                    }
                }
            } catch (e) {
                console.log("error", e);
            }
        },
        tabledataclear() {
            this.pat_no_flag = false;
            this.pat_name_flag = false;
            this.pat_sex_flag = false;
            this.pat_ageyear_flag = false;
            this.age_flag = false;
            this.year_flag = false;
            this.pat_idcardno_flag = false;
            this.pat_phone_flag = false;
            this.pat_nation_flag = false;
            this.pat_address_flag = false;
            this.pat_id_flag = false;
            //2.就诊信息 7项
            this.pat_cardno_flag = false;
            this.codena_flag = false;
            this.charge_typeno_flag = false;
            this.deptname_flag = false;
            this.wardname_flag = false;
            this.req_bedno_flag = false;
            this.pat_diag_flag = false;
            //3.样本信息 6项
            this.barcode_flag = false;
            this.hospitalname_flag = false;
            this.req_docno_flag = false;
            this.req_reason_flag = false;
            this.specimen_name_flag = false;
            this.report_comm_flag = false;
            this.specimen_comm_flag = false;
            //4.样本流转 6项
            this.req_dt_flag = false;
            this.sampled_dt_flag = false;
            this.send_dt_flag = false;
            this.send_dt1_flag = false;
            this.recieve_dt_flag = false;
            this.test_dt_flag = false;
            this.send_user_flag = false;
            this.send_user1_flag = false;
            this.report_user_flag = false;
            //5.检验信息 4项
            this.sampled_user_flag = false;
            this.rechk_user_flag = false;
            this.test_info_flag = false;
            this.lab_advice_flag = false;
            this.report_dt_flag = false;
            this.rechk_dt_flag = false;
            this.instrname_flag = false;
            this.tableData = [];
            this.tableData1 = [];
        },
        cellClassName({ row, rowindex, column }) {
            // if (row[column.property + "_color"] != null && row[column.property + "_color"] != undefined) {
            //     var p = { color: row[column.property + "_color"], background: row[column.property + "_bgcolor"] };
            //     return cellset(row[column.property + "_color"],row[column.property + "_bgcolor"]);
            // } else return "";
        },
        cellset(color, bgcolor) {
            return;
        },
    },
};
</script>

<style scoped>
.middle-right {
    position: relative;
    height: 100%;
    width: 500px;
    right: 0px;
}

.demo-image__placeholder .block {
    top: 20px;
    padding: 20px 0;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    vertical-align: top;
}

.block,
.demo-image__placeholder .block {
    width: 49%;
}

.demo-image .demonstration,
.demo-image__error .demonstration,
.demo-image__placeholder .demonstration {
    display: block;
    color: #8492a6;
    font-size: 14px;
    margin-bottom: 20px;
}

.table1style tr td {
    padding: 0px 0px 0px 0px;
}

table {
    font-size: 12px;
    border-collapse: separate;
    border-spacing: 5px;
}

.pagetop {
    left: 0;
    right: 0;
    height: 230px;
    display: -webkit-box;
    -webkit-box-pack: center;
    -webkit-box-align: center;
    border: solid 1px #ccc;
    position: absolute;
    z-index: 99;
    overflow-x: auto;
    white-space: nowrap;
}

.pagecenter {
    position: absolute;
    top: 233px;
    width: 100%;
    left: 0;
    bottom: 0px;
    overflow: auto;
}

::v-deep .el-input--suffix .el-input__inner {
    padding-right: 5px;
}

::v-deep .el-dialog--center .el-dialog__body {
    text-align: initial;
    padding: 3px 3px 205px 4px;
}

::v-deep .show_item {
    height: 40px;
    width: 140px;
}

::v-deep .el-checkbox__label {
    display: inline-block;
    padding-left: 5px;
    line-height: 19px;
    font-size: 12px;
}

.left_nav {
    width: 20%;
    height: 100%;
    border-right: 1px solid #ccc;
    padding: 0px 0px 0px 0px;
    float: left;
    display: inline;
}

.left_nav div {
    cursor: pointer;
    height: 40px;
    width: 100%;
    float: left;
    padding-left: 20px;
    line-height: 40px;
}

.left_nav .active {
    background-color: DeepSkyBlue;
}

.right_nav {
    width: 80%;
    height: 100%;
    display: inline-block;
    vertical-align: top;
    float: left;
    display: inline;
}

.center_nav {
    width: 500px;
    height: 203px;
    display: inline-block;
    vertical-align: top;
    float: left;
    display: inline;
}

.right_nav {
    width: 200px;
    height: 203px;
    display: inline-block;
    vertical-align: top;
    float: left;
    display: inline;
}

::v-deep.el-input-number.is-without-controls .el-input__inner {
    padding-left: 2px;
    padding-right: 3px;
}</style>